package com.erp.mapper;

import com.erp.mapper.vo.DepotAndAddress;
import com.erp.mapper.vo.DepotAndGoods;
import com.erp.pojo.Depot;
import com.erp.pojo.DepotExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface DepotMapper {
    long countByExample(DepotExample example);

    int deleteByExample(DepotExample example);

    int deleteByPrimaryKey(Integer dId);

    int insert(Depot record);

    int insertSelective(Depot record);

    List<Depot> selectByExample(DepotExample example);

    Depot selectByPrimaryKey(Integer dId);

    int updateByExampleSelective(@Param("record") Depot record, @Param("example") DepotExample example);

    int updateByExample(@Param("record") Depot record, @Param("example") DepotExample example);

    int updateByPrimaryKeySelective(Depot record);

    int updateByPrimaryKey(Depot record);

    List<DepotAndAddress>findDepotAndAddress();
    List<DepotAndAddress>limitDepotAndAddress(@Param("map")Map<String, Object>map);
    int countDepotAndAddress();
    DepotAndAddress conditionDepotAndAddress(String name);
    List<DepotAndGoods>findAllDepotAndGoods();

    List<Map>findAllDepots(@Param("map") Map<String, Object>map);
    int countDepots(@Param("map")Map<String, Object>map);
}